/**
 * Copyright (C) 2012 The SkyTvOS Project
 * <p/>
 * Version     Date           Author
 * ─────────────────────────────────────
 * 2013-12-11         wei li
 */

package com.coocaa.x.service.liteccconnecter;

import com.skyworth.framework.skycommondefine.SkyModuleDefs;

/**
 * <p>
 * Description:
 * </p>
 * <p>
 * write something
 * </p>
 *
 * @author wei li
 * @version V1.0.0
 * @ClassName TCUILogicUtil
 * @date 2013-12-11
 */
public class TCUILogicUtil {

    public final static String TIANCI_PROTOCOL = "tianci://";
    public final static String CMDHEADER_TAIL = "?cmd=";
    public final static String UILOGIC_HEAER_PREFIX = TIANCI_PROTOCOL
            + SkyModuleDefs.COM_TIANCI_UILOGIC + "/";
    public final static String cmdHeaderSys = UILOGIC_HEAER_PREFIX
            + SkyModuleDefs.COM_TIANCI_UILOGIC_CALSS + "?cmd=";
    public final static String cmdHeaderMedia = UILOGIC_HEAER_PREFIX
            + SkyModuleDefs.COM_TIANCI_UILOGIC_MEDIA_CALSS + CMDHEADER_TAIL;
    public final static String cmdHeaderTv = UILOGIC_HEAER_PREFIX
            + SkyModuleDefs.COM_TIANCI_UILOGIC_TV_CALSS + CMDHEADER_TAIL;
    public final static String cmdHeaderUser = UILOGIC_HEAER_PREFIX
            + SkyModuleDefs.COM_TIANCI_UILOGIC_USER_CALSS + CMDHEADER_TAIL;
    public final static String cmdHeaderPlayer = UILOGIC_HEAER_PREFIX
            + SkyModuleDefs.COM_TIANCI_UILOGIC_PLAYER_CALSS + CMDHEADER_TAIL;
    public final static String cmdHeaderNet = UILOGIC_HEAER_PREFIX
            + SkyModuleDefs.COM_TIANCI_UILOGIC_NET_CALSS + CMDHEADER_TAIL;
    public final static String cmdHeaderPush = UILOGIC_HEAER_PREFIX
            + SkyModuleDefs.COM_TIANCI_UILOGIC_PUSH_CALSS + CMDHEADER_TAIL;

    public static String getCmdheaderByModelscence(TCModelScence scence) {
        switch (scence) {
            case MEDIA:
                return cmdHeaderMedia;
            case TV:
                return cmdHeaderTv;
            case SYSTEM:
                return cmdHeaderSys;
            case USER:
                return cmdHeaderUser;
            case PLAYER:
                return cmdHeaderPlayer;
            case NET:
                return cmdHeaderNet;
            case PUSH:
                return cmdHeaderPush;
            default:
                break;
        }
        return cmdHeaderSys;
    }

    public final static String cmdTargetSys = SkyModuleDefs.COM_TIANCI_UILOGIC + "/"
            + SkyModuleDefs.COM_TIANCI_UILOGIC_CALSS;
    public final static String cmdTargetMedia = SkyModuleDefs.COM_TIANCI_UILOGIC + "/"
            + SkyModuleDefs.COM_TIANCI_UILOGIC_MEDIA_CALSS;
    public final static String cmdTargetTv = SkyModuleDefs.COM_TIANCI_UILOGIC + "/"
            + SkyModuleDefs.COM_TIANCI_UILOGIC_TV_CALSS;
    public final static String cmdTargetUser = SkyModuleDefs.COM_TIANCI_UILOGIC + "/"
            + SkyModuleDefs.COM_TIANCI_UILOGIC_USER_CALSS;
    public final static String cmdTargetPlayer = SkyModuleDefs.COM_TIANCI_UILOGIC + "/"
            + SkyModuleDefs.COM_TIANCI_UILOGIC_PLAYER_CALSS;
    public final static String cmdTargetNet = SkyModuleDefs.COM_TIANCI_UILOGIC + "/"
            + SkyModuleDefs.COM_TIANCI_UILOGIC_NET_CALSS;

    public static String getCmdTargetByModelscence(TCModelScence scence) {
        switch (scence) {
            case MEDIA:
                return cmdTargetMedia;
            case TV:
                return cmdTargetTv;
            case SYSTEM:
                return cmdTargetSys;
            case USER:
                return cmdTargetUser;
            case PLAYER:
                return cmdTargetPlayer;
            case NET:
                return cmdTargetNet;
            default:
                break;
        }
        return cmdTargetSys;
    }
}
